<?php

namespace CNAM\ActimanBundle\Entity;

use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
use CNAM\ActimanBundle\Entity\Service;


/**
 * @ORM\Entity
 * @ORM\Table(name="fos_user")
 */
class User extends BaseUser
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;
    
    /**
     * Constructor
     */
    public function __construct()
    {
        parent::__construct();
        $this->Procedures = new \Doctrine\Common\Collections\ArrayCollection();
    }
    
    /**
     * @var string
     *
     * @ORM\Column(name="nomUser", type="string", length=255)
     */
    private $nomUser;
    
    /**
     * @var string
     *
     * @ORM\Column(name="prenomUser", type="string", length=255)
     */
    private $prenomUser;
    
     /**
     *
     * @ORM\OneToMany(targetEntity="acProcedure",mappedBy="user")
     */
    protected $Procedures;
    
    /**
     * Get nomUser
     *
     * @return string 
     */
    public function getNomUser()
    {
        return $this->nomUser;
    }

    /**
     * Get prenomUser
     *
     * @return string 
     */
    public function getPrenomUser()
    {
        return $this->prenomUser;
    }

    /**
     * Set nomUser
     *
     * @param string $nomUser
     */
    public function setNomUser($nomUser) {
        $this->nomUser = $nomUser;
    }

    /**
     * Set prenomUser
     *
     * @param string $prenomUser
     */
    public function setPrenomUser($prenomUser) {
        $this->prenomUser = $prenomUser;
    }

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     *
     * @ORM\ManyToOne(targetEntity="Service")
     */
    protected $Service;
    
    /**
     *
     * @return Service
     */
    public function getService() {
        return $this->Service;
    }

    /**
     *
     * @param Service $Service
     */
    public function setService($Service) {
        $this->Service = $Service;
    }

    /**
     * Add Procedures
     *
     * @param \CNAM\ActimanBundle\Entity\acProcedure $procedures
     * @return User
     */
    public function addProcedure(\CNAM\ActimanBundle\Entity\acProcedure $procedures)
    {
        $this->Procedures[] = $procedures;

        return $this;
    }

    /**
     * Remove Procedures
     *
     * @param \CNAM\ActimanBundle\Entity\acProcedure $procedures
     */
    public function removeProcedure(\CNAM\ActimanBundle\Entity\acProcedure $procedures)
    {
        $this->Procedures->removeElement($procedures);
    }

    /**
     * Get Procedures
     *
     * @return \Doctrine\Common\Collections\Collection 
     */
    public function getProcedures()
    {
        return $this->Procedures;
    }
}
